import java.util.ArrayList;
import java.util.PriorityQueue;
import java.util.Scanner;
import java.util.Arrays;
class ListNode{
    int val;
    ListNode next = null;
    public ListNode(int val){
        this.val = val;
    }
}
public class Main {
    //删除第一个字符串中存在的所有第二个字符串有的元素
    public static void main5(String[] args){
        Scanner in = new Scanner(System.in);
        char[] s1 = in.nextLine().toCharArray();
        char[] s2 = in.nextLine().toCharArray();
        StringBuilder ret = new StringBuilder();
        for(char ch:s1){
            boolean isAdd = true;
            for(char c:s2){
                if(c == ch){
                    isAdd = false;
                }
            }
            if(isAdd){
                ret.append(ch);
            }
        }
        System.out.println(ret.toString());
    }
    //找两条链表的公共节点
    public ListNode FindFirstCommonNode(ListNode pHead1, ListNode pHead2) {
        //核心思想，将p1指针和p2指针分别从链表1和链表2遍历，p1第一次遍历完从pHead2开始遍历，p2第一次遍历完从pHead1开始遍历
        //则它们第二次必定能在公共节点相遇
        if(pHead1==null||pHead2==null){
            return null;
        }
        ListNode p1 = pHead1;
        ListNode p2 = pHead2;
        int count1 = 0;
        int count2 = 0;
        while(p1!=p2){
            p1 = p1.next;
            p2 = p2.next;
            if(p1==null){
                p1 = pHead2;
                count1++;
            }
            if(p2==null){
                p2 = pHead1;
                count2++;
            }
            if(count1>=2||count2>=2){
                return null;
            }
        }
        return p1;
    }
    //计算数组中shy有多少种组合
    public static void main4(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        in.nextLine();
        char[] s = in.nextLine().toCharArray();
        int sCount = 0;
        int shCount = 0;
        int shyCount = 0;
        for(char ch:s){
            if(ch=='s'){
                sCount++;
            }
            if(ch=='h'){
                shCount+=sCount;
            }
            if(ch=='y'){
                shyCount+=shCount;
            }
        }
        System.out.println(shyCount);
    }
    //从扑克牌中给5个数，看是否能成为顺子
    public boolean IsContinuous (int[] numbers) {
        //计算0的个数
        int zeroCount = 0;
        for(int num : numbers){
            if(num==0){
                zeroCount++;
            }
        }
        //创建noZeroNums数组，把非0数放进该数组
        int[] noZeroNums = new int[5-zeroCount];
        int index = 0;
        for(int num:numbers){
            if(num!=0){
                noZeroNums[index++] = num;
            }
        }
        //给非0数组排序
        Arrays.sort(noZeroNums);
        //找到最大值和最小值
        int min = noZeroNums[0];
        int max = noZeroNums[noZeroNums.length-1];
        //看是否有相同的数
        boolean gap = false;
        for(int i = 0;i<noZeroNums.length-1;i++){
            gap = noZeroNums[i]==noZeroNums[i+1];
            if(gap){
                break;
            }
        }
        //max-min>4则不可能连成顺子
        if(max-min>4){
            return false;
        }
        //有相同数也不可能连成顺子
        if(gap){
            return false;
        }else{
            return true;
        }
    }


    //青蛙跳台阶有几种跳法，深搜，斐波那契数列
    public static void main3(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[] dp = new int[n+1];
        dp[0] = 1;//表示跳上第一个台阶有1种跳法
        dp[1] = 2;//表示跳上第二个台阶有两种跳法
        for(int i = 2;i<n;i++){
            dp[i] = dp[i-1]+dp[i-2];
        }
        System.out.println(dp[n-1]);
    }
    //给一个整数每三位加一个逗号
    public static void main2(String[] args){
        Scanner in = new Scanner(System.in);
        char[] s = in.nextLine().toCharArray();
        int a = s.length%3;
        boolean b = false;//判断a是否大于0
        int i = 0;
        while(a>0){//先把前面的数打印
            System.out.print(s[i]);
            a--;
            i++;
            b = true;
        }
        if(b){
            System.out.print(',');
        }
        int j = 0;
        while(i<s.length){
            System.out.print(s[i]);
            i++;
            j++;
            if(j%3==0&&j!=s.length){
                System.out.print(',');
            }
        }
    }
    int m, n;
    int[] dx = {0, 0, 1, -1};
    int[] dy = {1, -1, 0, 0};
    boolean[][] vis = new boolean[210][210];
    public int solve (char[][] grid)
    {
        // dfs
        m = grid.length; n = grid[0].length;
        int ret = 0;
        for(int i = 0; i < m; i++)
        {
            for(int j = 0; j < n; j++)
            {
                if(grid[i][j] == '1' && !vis[i][j])
                {
                    ret++;
                    dfs(grid, i, j);
                }
            }
        }
        return ret;
    }
    public void dfs(char[][] grid, int i, int j)
    {
        vis[i][j] = true;
        for(int k = 0; k < 4; k++)
        {
            int x = i + dx[k], y = j + dy[k];
            if(x >= 0 && x < m && y >= 0 && y < n && grid[x][y] == '1' &&
                    !vis[x][y])
            {
                dfs(grid, x, y);
            }
        }
    }
    public static void main1(String[] args){
        Scanner in = new Scanner(System.in);
        char[] s = in.nextLine().toCharArray();
        int prev1 = -1,prev2 = -1;
        int i = 0;
        int index1 = -1,index2 = -1;
        while(i<s.length){
            if(s[i]>='0'&&s[i]<='9'){
                prev1 = i;
            }
            while(prev1>prev2){
                i++;
                if(i==s.length||s[i]<'0'||s[i]>'9'){
                    prev2 = i;
                }
            }
            if((index2-index1)<(prev2-prev1)){
                index1 = prev1;
                index2 = prev2;
            }
            i++;
        }
        for(int j = index1;j<index2;j++){
            System.out.print(s[j]);
        }
    }
    //算炉石传说上了多少分
    public static void main6(String[] args) {
        Scanner in = new Scanner(System.in);
        int T = in.nextInt();
        int[] ret = new int[T];
        while(T>0){
            int n = in.nextInt();//打了几场比赛
            int k = in.nextInt();//连胜奖励星数
            int count = 0;//记录连胜次数
            int sum = 0;
            char[] s = in.next().toCharArray();
            for(int i = 0;i<s.length;i++){
                if(s[i] == 'W'&& count<2){
                    count++;
                    sum++;
                }else if(s[i] == 'L'){
                    count = 0;
                    sum--;
                }else{
                    sum+=k;
                }
            }
            ret[ret.length-T] = sum;
            T--;
        }
        for(int x : ret){
            System.out.println(x);
        }
    }
    //动态规划问题
    public static void main7(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        in.nextLine();
        int[] nums = new int[n];
        int i = 0;
        while(i<n&&in.hasNextInt()){
            nums[i] = in.nextInt();
            i++;
        }
        int[] counts = new int[10001];
        int max = 0;
        for(int j = 0;j<nums.length;j++){
            int x = nums[j];
            max = Math.max(x,max);
            counts[x]++;
        }
        int[] dp = new int[10001];
        dp[0] = 0;
        dp[1] = 1*counts[1];
        for(int k =2;k<dp.length;k++){
            dp[k] = Math.max(dp[k-1],dp[k-2]+k*counts[k]);
        }
        System.out.println(dp[max]);
    }
    //String line 中line.spilt()可以将字符串以空格分开成多个字符串
    //Integer.parseInt 可以将字符串的数字转为整型
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.nextLine();
        String[] numStrings = s.split(" ");
        int[] nums = new int[numStrings.length];
        for(int i = 0;i<nums.length;i++){
            nums[i] = Integer.parseInt(numStrings[i]);//将字符串
        }
        String s1 = "10";
        int n = Integer.parseInt(s1);
        System.out.println(n+1);
    }


    //合并k个已排序的链表
    //用小根堆解决
    public ListNode mergeKLists (ArrayList<ListNode> lists) {
        PriorityQueue<ListNode> heap = new PriorityQueue<>((l1, l2)->{
            return l1.val - l2.val;
        });//创建小根堆

        for(int i = 0;i<lists.size();i++){
            //把非空的头节点放进小根堆
            if(lists.get(i)!=null){
                heap.offer(lists.get(i));
            }
        }
        ListNode ret = new ListNode(0);
        ListNode cur = ret;

        while(!heap.isEmpty()){
            ListNode t = heap.poll();
            cur.next = t;
            cur = cur.next;
            if(t.next!=null){
                heap.offer(t.next);
            }
        }
        return ret.next;
    }
    //用归并排序的方式解决
    public ListNode mergeKLists2 (ArrayList<ListNode> lists){
      return mergekListsHelper(lists,0,lists.size()-1);
    }

    private ListNode mergekListsHelper(ArrayList<ListNode> lists, int start, int end) {
        if(start>end) return null;
        if(start == end) return lists.get(start);
        int mid = (start+end)/2;
        ListNode left = mergekListsHelper(lists,start,mid);
        ListNode right = mergekListsHelper(lists,mid+1,end);
        return mergekTwoLists(left,right);
    }
    //将两个链表合并
    private ListNode mergekTwoLists(ListNode l1,ListNode l2){
        ListNode ret = new ListNode(0);
        ListNode cur = ret;
        while(l1!=null&&l2!=null){
            if(l1.val<=l2.val){
                cur.next = l1;
                l1 = l1.next;
            }else{
                cur.next = l2;
                l2 = l2.next;
            }
            cur = cur.next;
        }
        cur.next = (l1!=null)?l1:l2;
        return ret.next;
    }

}
